import request from '@/utils/request'

//模糊查询带分页 条件可为空 将方法导出
export function getTeacherList(current, limit, teacherQuery) {
  return request({
    url: `/eduservice/teacher/pageTeacherCondition/${current}/${limit}`,
    method: 'post',
    data: teacherQuery
  })
}

export function getAllTeacherList() {
  return request({
    url: `/eduservice/teacher/findAll`,
    method: 'get'
  })
}

//根据id删除 将方法导出
export function removeDataById(id) {
  return request({
    url: `/eduservice/teacher/${id}`,
    method: 'delete'
  })
}

//讲师添加部分
export function addTeacher(teacher) {
  return request({
    url: `/eduservice/teacher/`,
    method: 'post',
    data: teacher
  })
}

//根据id查询
export function editTeacher(id) {
  return request({
    url: `/eduservice/teacher/${id}`,
    method: 'get'
  })
}

//根据id修改
export function updateTeacher(teacher) {
  return request({
    url: `/eduservice/teacher/update`,
    method: 'post',
    data: teacher
  })
}
